package org.design.thread.two;

import org.springframework.context.ApplicationEvent;

/**
 * OrderCreatedEvent
 * 事件监听（ApplicationEventPublisher）
 * 适用场景：系统解耦，异步处理事件
 * 定义事件
 *
 * @author 樊温军
 * @date 2025/6/13 下午5:33
 */
public class OrderCreatedEvent extends ApplicationEvent {
    private Long orderId;

    public OrderCreatedEvent(Object source, Long orderId) {
        super(source);
        this.orderId = orderId;
    }
    // getter
    public Long getOrderId() {
        return orderId;
    }
}

